<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Promise的ALL静态方法实现</title>
  </head>
  <body></body>
  <script src="js/Hd.js"></script>
  <script>
    let p1 = new Hd((resolve, reject) => {
      resolve("后盾人");
      // reject("向边");
    });
    let p2 = new Hd((resolve, reject) => {
      resolve("几字");
      reject("向军");
    });
    Hd.all([p1, p2]).then(
      (value) => {
        console.log(value);
      },
      (reason) => {
        console.log("error" + reason);
      }
    );
  </script>
</html>
